<template>
    <div class="bread-crumb">
        <Breadcrumb>
            <BreadcrumbItem v-for="item in currentPath" :to="item" :key="item.name">
                {{ itemTitle(item) }}
            </BreadcrumbItem>
        </Breadcrumb>
    </div>
</template>

<script lang="ts">
import {Component, Vue, Prop} from 'vue-property-decorator';
import AppBase from '@/lib/abpbase';

@Component({})
export default class BreadcrumbNav extends AppBase {
    name: string = 'BreadcrumbNav';

    @Prop({type: Array}) currentPath: any[];

    itemTitle(item: any): string {
        return item.meta.title;

    }
}
</script>

<style lang="less">
@import './styles/breadcrumb-nav.less';
</style>
